package com.mianshi.java01.entity;

// 水果基类
public abstract class Fruit {
    private String name;
    private double originalPrice;

    public Fruit(String name, double originalPrice) {
        this.name = name;
        this.originalPrice = originalPrice;
    }

    public String getName() {
        return name;
    }

    public double getOriginalPrice() {
        return originalPrice;
    }

    // 计算折扣后的价格
    public abstract double getDiscountedPrice();
}
